package com.ermace.robo.jumper.game;

import com.ermace.robo.jumper.game.GameObjects.GameObject;

public enum MissionList {

	MISSION1(2,0,0, "Old City", 1, 0),
	MISSION2(4,0,0, "Old City", 2, 1),
	MISSION3(2,2,0, "Old City", 3, 2),
	MISSION4(0,4,0, "Old City", 4, 3),
	MISSION5(0,2,2, "Old City", 5, 4),
	MISSION6(0,0,4, "Old City", 6, 5),
	MISSION7(2,0,0, "Snowland", 1, 6),
	MISSION8(4,0,0, "Snowland", 2, 7),
	MISSION9(2,2,0, "Snowland", 3, 8),
	MISSION10(0,4,0, "Snowland", 4, 9),
	MISSION11(0,2,2, "Snowland", 5, 10),
	MISSION12(0,0,4, "Snowland", 6, 11),
	MISSION13(2,0,0, "Space", 1, 12),
	MISSION14(4,0,0, "Space", 2, 13),
	MISSION15(2,2,0, "Space", 3, 14),
	MISSION16(0,4,0, "Space", 4, 15),
	MISSION17(0,2,2, "Space", 5, 16),
	MISSION18(0,0,4, "Space", 6, 17),
	MISSION19(2,0,0, "Lavaland", 1, 18),
	MISSION20(4,0,0, "Lavaland", 2, 19),
	MISSION21(2,2,0, "Lavaland", 3, 20),
	MISSION22(0,4,0, "Lavaland", 4, 21),
	MISSION23(0,2,2, "Lavaland", 5, 22),
	MISSION24(0,0,4, "Lavaland", 6, 23);
	
	
	
	
	public static Mission getMissionByID(int missionID) {
		for(MissionList mission: MissionList.values())
			if (mission.missionID == missionID)
			
				return mission.getMission();
		
		return null;
	}
	
	private String mapName;
	private int missionNr;
	private int nrOfEasyAi;
	private int nrOfMediumAi;
	private int nrOfHardAi;
	private int missionID;
	
	private MissionList(int nrOfEasyAi, int nrOfMediumAi, int nrOfHardAi, String mapName, int missionNr, int missionID)
	{
		this.nrOfEasyAi = nrOfEasyAi;
		this.nrOfMediumAi = nrOfMediumAi;
		this.nrOfHardAi = nrOfHardAi;
		this.mapName = mapName;
		this.missionNr = missionNr;
		this.missionID = missionID;
	}
	
	public Mission getMission() {
		Mission mission = new Mission(nrOfEasyAi, nrOfMediumAi, nrOfHardAi, mapName, missionNr, missionID);
		
		return mission;
	}
	
}
